package com.pet.server.dao.common;

import com.pet.framework.dao.util.TemplateDao;
import com.pet.framework.page.Page;
import com.pet.framework.util.StringUtil;
import com.pet.server.po.TaskInfo;
import com.pet.system.statement.Statement;

public class TaskDao extends TemplateDao {

	
	public void searchTaskInfo(Page page,TaskInfo task){
         Statement stms = stmsFactory.createStatement(" from TaskInfo ti where 1=1 and  state!=4");
         if(!StringUtil.isEmpty(task)){
        	 stms.append("and", "ti.taskType", "=", task.getTaskType());
        	 stms.append("and", "ti.taskId", "=", task.getTaskId());
         }
         stms.addOrderBy("ti.id desc");
         templateDao.search(stms, page);
	}
}
